package com.example.bookmall.service;

import com.example.bookmall.entity.address.Address;
import com.example.bookmall.entity.Result;

import java.util.List;

public interface AddressService  {

    //设置默认地址
    boolean setDefaultAddress(Integer addressId, Integer userId);

    //添加地址
    Result addAddress(Address address);

    //获取地址列表
    List<Address> addressList(Integer userId);

    //修改地址
    Result modifyAddress(Integer addressId,Integer userId,Address address);

    //删除地址
    Result removeById(Integer addressId);

    //获取地址根据地址id
    Address getById(Integer addressId);

    //获取地址根据地址id和用户id
    Address getByAddressIdUserId(Integer newAddressId, Integer userId);

    //取消默认地址
    boolean setUnDefaultAddress(Integer addressId, Integer userId);

    //获取地址根据地址id包含逻辑删除的
    Address getByIdIncludeDeleted(Integer addressId);

}
